package com.fourth.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fourth.vo.ExamineVo;
import com.ljx.entity.Appeal;
import com.ljx.entity.BusinessInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;


/**
 * @author C-Q
 * @version 1.1.0
 * @Description: TODO
 * @date 2023/2/27
 */
@Mapper
public interface BusinessDao extends BaseMapper<BusinessInfo> {

    /**
     * 分页查询BusinessInfo商家入住审核表数据返回给前端
     * @return
     */
    List<BusinessInfo> businessDao();
    List<BusinessInfo> businessDao1(BusinessInfo businessInfo);


    /**
     * 商家入驻审核操作
     * @param businessInfo
     * @return
     */
    int updateInfo(BusinessInfo businessInfo);

   /**
    * 查询所有店铺
    * @return
    */
    @Select("select * from b_business_info")
    List<BusinessInfo> selectAllBusiness();


    /**
     * 修改表中店铺对应的状态和停业原因
     * @param
     * @return
     */
    @Select("UPDATE b_business_info SET  state=2 WHERE id=#{bid}")
    void updateBusinessStatus(ExamineVo examineVo);

    /**
     * 修改商家表营业状态
     * @param busid
     */
    @Select("UPDATE b_business_info SET  state=0 WHERE id=#{busid}")
    void updateBusinessState(String  busid);

}
